<template>
	<view>
		<view class="bg"></view>
		<image @click.stop="performaceTap" class="dailyTap" src="../../static/dailybaby/btn.png" mode=""></image>
		<today-content :situationList='situationList' :currentTab='currentTab' @parentSelectTap="parentSelectTap($event)"></today-content>
	</view>
</template>

<script>
	import todayContent from '@/components/today-content/today-content.vue'
	export default {
		components:{
			todayContent,
		},
		data() {
			return {
				// circles:'circles',
				// pos0:'pos0',
				// pos1:'pos1',
				// pos2:'pos2',
				currentTab: 0,
				situationList: [{
					'src': require('../../static/dailybaby/5.png'),
					'src1': require('../../static/dailybaby/5-1.png'),
					'name': '运动数据',
					'times': '运动时长',
					'range': '运动时段',
					'status': '',
					stateList:[{
						'times': '大便次数1111',
					},{
						'times': '大便次数2',
					},{
						'times': '大便次数3',
					},]
				}, {
					'src': require('../../static/dailybaby/2.png'),
					'src1': require('../../static/dailybaby/2-1.png'),
					'name': '睡眠管理',
					'times': '睡眠时长',
					'range': '睡眠时段',
					'status': '睡眠状态',
					stateList:[{
						'times': '大便次数1',
					},{
						'times': '大便次数2',
					},{
						'times': '大便次数3',
					},]
				}, {
					'src': require('../../static/dailybaby/4.png'),
					'src1': require('../../static/dailybaby/4-1.png'),
					'name': '排便情况',
					'times': '大便次数',
					'range': '小便次数',
					'status': '排便状态',
					stateList:[{
						'times': '大便次数1',
					},{
						'times': '大便次数2',
					},{
						'times': '大便次数3',
					},]
				}],
			};
		},
		methods: {
			parentSelectTap(index) {
				console.log(index)
				this.currentTab = index;
			},
			performaceTap(){
				uni.navigateTo({
					url: '../todayPerformance/todayPerformance'
				})
			}
		}
	}
</script>

<style lang="less">
	@blue: #00ABC0;

	.bg {
		z-index: -1;
		width: 100%;
		height: 529rpx;
		background: url(../../static/dailybaby/bg.png);
		background-color: @blue;
		background-repeat: no-repeat;
		background-size: 100% 100%;
		position: relative;
	}
	
	.dailyTap {
		display: block;
		width: 379rpx;
		height: 176rpx;
		position: absolute;
		top: 200rpx;
		left: 340rpx;
		transform: translate(-50%, -50%);
	}
</style>
